package com.bw.module_staff.repo

import com.bw.lib_common.entity.BaseResponse
import com.bw.lib_common.model.BaseRepository
import com.bw.lib_http.OkHttpClientManager
import com.bw.module_staff.api.StaffApiService
import com.bw.module_staff.entity.StaffEntity
/**
 * 工单-智慧园区-人员管理
 */

class StaffRepo:BaseRepository<StaffApiService>() {
    override fun createApiServer(): StaffApiService = OkHttpClientManager.retrofitInstance.create(StaffApiService::class.java)

    suspend fun getStaff(): BaseResponse<List<StaffEntity>>{
        return apiService.getStaff()
    }

    suspend fun addStaff(staffEntity: StaffEntity): BaseResponse<StaffEntity>{
        return apiService.addStaff(staffEntity)
    }
}